package com.gudaomai.ekproject.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.gudaomai.ekproject.common.EkBaseMapper;
import com.gudaomai.ekproject.entity.RolesPermissions;

/**
 * <p>
 * roles_permissions Mapper 接口
 * </p>
 *
 * @author zenghualu
 * @since 2017-06-26
 */
public interface RolesPermissionsMapper extends EkBaseMapper<RolesPermissions> {

	@Delete("delete from roles_permissions where permission_id=#{pid} and role_id=#{rid}")
	public int delRolesPermissionsByRidPid(@Param("pid") String pid, @Param("rid") String rid);

	@Select("select * from roles_permissions where permission_id=#{pid} and role_id=#{rid}")
	public RolesPermissions getRolesPermissionsByPidRid(@Param("pid") String pid, @Param("rid") String rid);

}